package net.homelinux.chaoswg.io.renga.core.gui.operations.visualisations;

import java.awt.Color;
import java.awt.Graphics;
import java.awt.Point;
import java.awt.Rectangle;

public class BlockVisualisation extends Visualisation {
    protected Color inner = null;
    
    public BlockVisualisation () {
        this.area.x = 0;
        this.area.y = 0;
        this.area.width = 330;
        this.area.height = 32;
    }
    
    public BlockVisualisation (final int x, final int y, final int width, final int heigtht) {
        this.area.x = x;
        this.area.y = y;
        this.area.width = width;
        this.area.height = heigtht;
        this.inner = Color.WHITE;
    }
    
    public BlockVisualisation (final Point position, final int width, final int height) {
        this.area.setLocation(position);
        this.area.width = width;
        this.area.height = height;
        this.inner = Color.WHITE;
    }

    public BlockVisualisation (final Rectangle rect) {
        this.area = rect;
        this.inner = Color.WHITE;
    }
    
    @Override
    public void draw(final Graphics g) {
        g.setColor(Color.BLACK);
        g.fillRect(this.area.x, this.area.y, this.area.width, this.area.height);
        g.setColor(inner);
        g.fillRect(this.area.x+4, this.area.y+4, this.area.width-8, this.area.height-8);
        g.setColor(Color.BLACK);
    }
}
